package day12;

//同一种事物，由于条件不同，产生的结果也不同
//同一种类型
public class Pet {
    protected String name;
    protected int health;
    protected int love;

    public Pet() {
    }

    public Pet(String name, int health, int love) {
        this.name = name;
        this.health = health;
        this.love = love;
    }

    public void show(){
        System.out.println("宠物姓名:"+this.name);
        System.out.println("宠物的健康值:"+this.health);
        System.out.println("宠物的喜爱度:"+this.love);
    }


    public void eat() {

        System.out.println("父类宠物吃的方法");
    }
    public void toHospital(){
        System.out.println("宠物去医院");
    }
}
